/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */

#ifndef __SCRIPT_COMPONENT_H__
#define __SCRIPT_COMPONENT_H__

#include "Component.h"

//using nono as our script engine
#include <mono/jit/jit.h>
#include <mono/metadata/environment.h>
#include <mono/metadata/mono-config.h>
#include <mono/metadata/assembly.h>

namespace PQEngine
{
	enum ScriptComponentType
	{
		SCRIPT_TYPE_UNKNOWN,
		SCRIPT_TYPE_CSHARP,

	};
	
	//Component only belong to one object
	class ScriptComponent
		: public Component
	{
	private:
		std::string _scriptPath;
		std::string _scriptName;//also class name
		ScriptComponentType _scriptType;
	public:
		static ScriptComponent* get(int id);
		ScriptComponent(std::string scriptPath);

		ScriptComponentType getScriptType();
		std::string getScriptName();

		std::string getScriptPath();
		void update(float deltaT);
		void attach(GameObject *obj);
	};
}
#endif
